package chapter04.Example20_23;

interface Animal{
    void shout();
}
public class Example23 {
    public static void main(String[] args) {
        String name = "小花";
        animalShout(new Animal(){

            @Override
            public void shout() {
                System.out.println(name+"喵喵......");
            }
        });
    }

    private static void animalShout(Animal an) {
        an.shout();
    }
}